<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<%--
    <form id="reservationFieldRequestForm" action="<c:out value="${reservationFieldRequest.successView}"/>.html" method="POST">
--%>
    <form id="reservationFieldRequestForm" action="reserveFieldStep2.html" method="POST">
        <input type="hidden" name="clubId"/>
        <select id="regionInput" style="width: 150px;" name="regionId">
            <option value="--Select--">-- Make a selection --</option>
            <c:forEach items="${reservationFieldRequest.regions}" var="region">
                <c:choose>
                    <c:when test="${region.id == reservationFieldRequest.regionId}">
                        <option value="<c:out value="${region.id}"/>" selected="yes"><c:out value="${region.name}"/></option>
                    </c:when>
                    <c:otherwise>
                        <option value="<c:out value="${region.id}"/>"><c:out value="${region.name}"/></option>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </select>

        <select id="sportsInput" style="width: 150px;" name="sportId">
            <option value="--Select--">-- Make a selection --</option>
            <c:forEach items="${sports}" var="sport">
                <c:choose>
                    <c:when test="${sport.id == reservationFieldRequest.sportId}">
                        <option value="<c:out value="${sport.id}"/>" selected="yes"><c:out value="${sport.name}"/></option>
                    </c:when>
                    <c:otherwise>
                        <option value="<c:out value="${sport.id}"/>"><c:out value="${sport.name}"/></option>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </select>
        <input type="submit" value="Go"/>
    </form>